class AddAuthoritiesTable < ActiveRecord::Migration
  def self.up
    create_table :authorities do |t|
      t.column :name, :string
    end
    "Aberdeen City Council,Aberdeenshire Council,Angus Council,Argyll and Bute Council,Clackmannanshire Council,Comhairle nan Eilean Siar,Dumfries and Galloway Council,Dundee City Council,East Ayrshire Council,East Dunbartonshire Council,East Lothian Council,East Renfrewshire Council,Edinburgh City Council,Falkirk Council,Fife Council,Glasgow City Council,Highland Council,Inverclyde Council,Midlothian Council,Moray Council,National,North Ayrshire Council,North Lanarkshire Council,Orkney Islands Council,Perth and Kinross Council,Renfrewshire Council,Scottish Borders Council,Shetland Islands Council,South Ayrshire Council,South Lanarkshire Council,Stirling Council,West Dunbartonshire Council,West Lothian Council".split(',').each do |authority|
      Authority.create(:name=>authority)
    end
    #add_column :feeds, :authority_id, :integer
  end

  def self.down
    drop_table :authorities
  end
end

